<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998

-}</span><span>
</span><span id="line-5"></span><span>
</span><span id="line-6"></span><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-7"></span><span>
</span><span id="line-8"></span><span class="hs-comment">-- | The @GHC.Builtin.Utils@ interface to the compiler's prelude knowledge.</span><span>
</span><span id="line-9"></span><span class="hs-comment">--</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- This module serves as the central gathering point for names which the</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- compiler knows something about. This includes functions for,</span><span>
</span><span id="line-12"></span><span class="hs-comment">--</span><span>
</span><span id="line-13"></span><span class="hs-comment">--  * discerning whether a 'Name' is known-key</span><span>
</span><span id="line-14"></span><span class="hs-comment">--</span><span>
</span><span id="line-15"></span><span class="hs-comment">--  * given a 'Unique', looking up its corresponding known-key 'Name'</span><span>
</span><span id="line-16"></span><span class="hs-comment">--</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- See Note [Known-key names] and Note [About wired-in things] for information</span><span>
</span><span id="line-18"></span><span class="hs-comment">-- about the two types of prelude things in GHC.</span><span>
</span><span id="line-19"></span><span class="hs-comment">--</span><span>
</span><span id="line-20"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Builtin.Utils</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-21"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Known-key names</span></span><span>
</span><span id="line-22"></span><span>        </span><span class="annot"><a href="GHC.Builtin.Utils.html#isKnownKeyName"><span class="hs-identifier">isKnownKeyName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>        </span><span class="annot"><a href="GHC.Builtin.Utils.html#lookupKnownKeyName"><span class="hs-identifier">lookupKnownKeyName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>        </span><span class="annot"><a href="GHC.Builtin.Utils.html#lookupKnownNameInfo"><span class="hs-identifier">lookupKnownNameInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>
</span><span id="line-26"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Internal use</span></span><span>
</span><span id="line-27"></span><span>        </span><span class="hs-comment">-- | 'knownKeyNames' is exported to seed the original name cache only;</span><span>
</span><span id="line-28"></span><span>        </span><span class="hs-comment">-- if you find yourself wanting to look at it you might consider using</span><span>
</span><span id="line-29"></span><span>        </span><span class="hs-comment">-- 'lookupKnownKeyName' or 'isKnownKeyName'.</span><span>
</span><span id="line-30"></span><span>        </span><span class="annot"><a href="GHC.Builtin.Utils.html#knownKeyNames"><span class="hs-identifier">knownKeyNames</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Miscellaneous</span></span><span>
</span><span id="line-33"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.Make.html#wiredInIds"><span class="hs-identifier">wiredInIds</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#ghcPrimIds"><span class="hs-identifier">ghcPrimIds</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>        </span><span class="annot"><a href="GHC.Core.Opt.ConstantFold.html#primOpRules"><span class="hs-identifier">primOpRules</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.ConstantFold.html#builtinRules"><span class="hs-identifier">builtinRules</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>
</span><span id="line-36"></span><span>        </span><span class="annot"><a href="GHC.Builtin.Utils.html#ghcPrimExports"><span class="hs-identifier">ghcPrimExports</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>        </span><span class="annot"><a href="GHC.Builtin.Utils.html#ghcPrimDeclDocs"><span class="hs-identifier">ghcPrimDeclDocs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>        </span><span class="annot"><a href="GHC.Builtin.Utils.html#primOpId"><span class="hs-identifier">primOpId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Random other things</span></span><span>
</span><span id="line-41"></span><span>        </span><span class="annot"><a href="GHC.Builtin.Utils.html#maybeCharLikeCon"><span class="hs-identifier">maybeCharLikeCon</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Builtin.Utils.html#maybeIntLikeCon"><span class="hs-identifier">maybeIntLikeCon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-42"></span><span>
</span><span id="line-43"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Class categories</span></span><span>
</span><span id="line-44"></span><span>        </span><span class="annot"><a href="GHC.Builtin.Utils.html#isNumericClass"><span class="hs-identifier">isNumericClass</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Builtin.Utils.html#isStandardClass"><span class="hs-identifier">isStandardClass</span></a></span><span>
</span><span id="line-45"></span><span>
</span><span id="line-46"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Uniques.html"><span class="hs-identifier">GHC.Builtin.Uniques</span></a></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html"><span class="hs-identifier">GHC.Types.Unique</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#isValidKnownKeyUnique"><span class="hs-identifier">isValidKnownKeyUnique</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-54"></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.ConLike.html"><span class="hs-identifier">GHC.Core.ConLike</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.ConLike.html#ConLike"><span class="hs-identifier">ConLike</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Names.TH.html"><span class="hs-identifier">GHC.Builtin.Names.TH</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Builtin.Names.TH.html#templateHaskellNames"><span class="hs-identifier">templateHaskellNames</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Names.html"><span class="hs-identifier">GHC.Builtin.Names</span></a></span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Opt.ConstantFold.html"><span class="hs-identifier">GHC.Core.Opt.ConstantFold</span></a></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html"><span class="hs-identifier">GHC.Types.Avail</span></a></span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.PrimOps.html"><span class="hs-identifier">GHC.Builtin.PrimOps</span></a></span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html"><span class="hs-identifier">GHC.Core.DataCon</span></a></span><span>
</span><span id="line-62"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.html"><span class="hs-identifier">GHC.Types.Id</span></a></span><span>
</span><span id="line-64"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-65"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Env.html"><span class="hs-identifier">GHC.Types.Name.Env</span></a></span><span>
</span><span id="line-66"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html"><span class="hs-identifier">GHC.Types.Id.Make</span></a></span><span>
</span><span id="line-67"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-68"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Types.Prim.html"><span class="hs-identifier">GHC.Builtin.Types.Prim</span></a></span><span>
</span><span id="line-69"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Types.html"><span class="hs-identifier">GHC.Builtin.Types</span></a></span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html"><span class="hs-identifier">GHC.Driver.Types</span></a></span><span>
</span><span id="line-71"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Class.html"><span class="hs-identifier">GHC.Core.Class</span></a></span><span>
</span><span id="line-72"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html"><span class="hs-identifier">GHC.Core.TyCon</span></a></span><span>
</span><span id="line-73"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html"><span class="hs-identifier">GHC.Types.Unique.FM</span></a></span><span>
</span><span id="line-74"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Utils</span></span><span>
</span><span id="line-75"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Types.Literals.html"><span class="hs-identifier">GHC.Builtin.Types.Literals</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Builtin.Types.Literals.html#typeNatTyCons"><span class="hs-identifier">typeNatTyCons</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-76"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html"><span class="hs-identifier">GHC.Hs.Doc</span></a></span><span>
</span><span id="line-77"></span><span>
</span><span id="line-78"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Applicative.html#"><span class="hs-identifier">Control.Applicative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator">(&lt;|&gt;)</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-79"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span>        </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.OldList.html#intercalate"><span class="hs-identifier">intercalate</span></a></span><span> </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#find"><span class="hs-identifier">find</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-80"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../array/src/Data.Array.html#"><span class="hs-identifier">Data.Array</span></a></span><span>
</span><span id="line-81"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Maybe.html#"><span class="hs-identifier">Data.Maybe</span></a></span><span>
</span><span id="line-82"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.html#"><span class="hs-identifier">Data.Map</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Map</span></span><span>
</span><span id="line-83"></span><span>
</span><span id="line-84"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection[builtinNameInfo]{Lookup built-in names}
*                                                                      *
************************************************************************

Note [About wired-in things]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Wired-in things are Ids\/TyCons that are completely known to the compiler.
  They are global values in GHC, (e.g.  listTyCon :: TyCon).

* A wired-in Name contains the thing itself inside the Name:
        see Name.wiredInNameTyThing_maybe
  (E.g. listTyConName contains listTyCon.

* The name cache is initialised with (the names of) all wired-in things
  (except tuples and sums; see Note [Infinite families of known-key names])

* The type environment itself contains no wired in things. The type
  checker sees if the Name is wired in before looking up the name in
  the type environment.

* GHC.Iface.Make prunes out wired-in things before putting them in an interface file.
  So interface files never contain wired-in things.
-}</span><span>
</span><span id="line-110"></span><span>
</span><span id="line-111"></span><span>
</span><span id="line-112"></span><span class="hs-comment">-- | This list is used to ensure that when you say &quot;Prelude.map&quot; in your source</span><span>
</span><span id="line-113"></span><span class="hs-comment">-- code, or in an interface file, you get a Name with the correct known key (See</span><span>
</span><span id="line-114"></span><span class="hs-comment">-- Note [Known-key names] in &quot;GHC.Builtin.Names&quot;)</span><span>
</span><span id="line-115"></span><span class="annot"><a href="GHC.Builtin.Utils.html#knownKeyNames"><span class="hs-identifier hs-type">knownKeyNames</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-116"></span><span id="knownKeyNames"><span class="annot"><span class="annottext">knownKeyNames :: [Name]
</span><a href="GHC.Builtin.Utils.html#knownKeyNames"><span class="hs-identifier hs-var hs-var">knownKeyNames</span></a></span></span><span>
</span><span id="line-117"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Utils.Misc.html#debugIsOn"><span class="hs-identifier hs-var">debugIsOn</span></a></span><span>
</span><span id="line-118"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680995731"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680995731"><span class="hs-identifier hs-var">badNamesStr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; Maybe String
</span><a href="GHC.Builtin.Utils.html#knownKeyNamesOkay"><span class="hs-identifier hs-var">knownKeyNamesOkay</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680995729"><span class="hs-identifier hs-var">all_names</span></a></span><span>
</span><span id="line-119"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [Name]
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;badAllKnownKeyNames:\n&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680995731"><span class="hs-identifier hs-var">badNamesStr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-120"></span><span>       </span><span class="hs-comment">-- NB: We can't use ppr here, because this is sometimes evaluated in a</span><span>
</span><span id="line-121"></span><span>       </span><span class="hs-comment">-- context where there are no DynFlags available, leading to a cryptic</span><span>
</span><span id="line-122"></span><span>       </span><span class="hs-comment">-- &quot;&lt;&lt;details unavailable&gt;&gt;&quot; error. (This seems to happen only in the</span><span>
</span><span id="line-123"></span><span>       </span><span class="hs-comment">-- stage 2 compiler, for reasons I [Richard] have no clue of.)</span><span>
</span><span id="line-124"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-125"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680995729"><span class="hs-identifier hs-var">all_names</span></a></span><span>
</span><span id="line-126"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-127"></span><span>    </span><span id="local-6989586621680995729"><span class="annot"><span class="annottext">all_names :: [Name]
</span><a href="#local-6989586621680995729"><span class="hs-identifier hs-var hs-var">all_names</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-128"></span><span>      </span><span class="hs-comment">-- We exclude most tuples from this list&#8212;see</span><span>
</span><span id="line-129"></span><span>      </span><span class="hs-comment">-- Note [Infinite families of known-key names] in GHC.Builtin.Names.</span><span>
</span><span id="line-130"></span><span>      </span><span class="hs-comment">-- We make an exception for Solo (i.e., the boxed 1-tuple), since it does</span><span>
</span><span id="line-131"></span><span>      </span><span class="hs-comment">-- not use special syntax like other tuples.</span><span>
</span><span id="line-132"></span><span>      </span><span class="hs-comment">-- See Note [One-tuples] (Wrinkle: Make boxed one-tuple names have known keys)</span><span>
</span><span id="line-133"></span><span>      </span><span class="hs-comment">-- in GHC.Builtin.Types.</span><span>
</span><span id="line-134"></span><span>      </span><span class="annot"><span class="annottext">TupleSort -&gt; Int -&gt; Name
</span><a href="GHC.Builtin.Types.html#tupleTyConName"><span class="hs-identifier hs-var">tupleTyConName</span></a></span><span> </span><span class="annot"><span class="annottext">TupleSort
</span><a href="GHC.Types.Basic.html#BoxedTuple"><span class="hs-identifier hs-var">BoxedTuple</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [Name]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">Boxity -&gt; Int -&gt; Name
</span><a href="GHC.Builtin.Types.html#tupleDataConName"><span class="hs-identifier hs-var">tupleDataConName</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity
</span><a href="GHC.Types.Basic.html#Boxed"><span class="hs-identifier hs-var">Boxed</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [Name]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span>
</span><span id="line-135"></span><span>      </span><span class="annot"><span class="annottext">[[Name]] -&gt; [Name]
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; [Name]
</span><a href="#local-6989586621680995718"><span class="hs-identifier hs-var">wired_tycon_kk_names</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="GHC.Builtin.Types.Prim.html#funTyCon"><span class="hs-identifier hs-var">funTyCon</span></a></span><span>
</span><span id="line-136"></span><span>             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(TyCon -&gt; [Name]) -&gt; [TyCon] -&gt; [Name]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; [Name]
</span><a href="#local-6989586621680995718"><span class="hs-identifier hs-var">wired_tycon_kk_names</span></a></span><span> </span><span class="annot"><span class="annottext">[TyCon]
</span><a href="GHC.Builtin.Types.Prim.html#primTyCons"><span class="hs-identifier hs-var">primTyCons</span></a></span><span>
</span><span id="line-137"></span><span>             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(TyCon -&gt; [Name]) -&gt; [TyCon] -&gt; [Name]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; [Name]
</span><a href="#local-6989586621680995718"><span class="hs-identifier hs-var">wired_tycon_kk_names</span></a></span><span> </span><span class="annot"><span class="annottext">[TyCon]
</span><a href="GHC.Builtin.Types.html#wiredInTyCons"><span class="hs-identifier hs-var">wiredInTyCons</span></a></span><span>
</span><span id="line-138"></span><span>             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(TyCon -&gt; [Name]) -&gt; [TyCon] -&gt; [Name]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; [Name]
</span><a href="#local-6989586621680995718"><span class="hs-identifier hs-var">wired_tycon_kk_names</span></a></span><span> </span><span class="annot"><span class="annottext">[TyCon]
</span><a href="GHC.Builtin.Types.Literals.html#typeNatTyCons"><span class="hs-identifier hs-var">typeNatTyCons</span></a></span><span>
</span><span id="line-139"></span><span>             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(Id -&gt; Name) -&gt; [Id] -&gt; [Name]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="GHC.Types.Id.Make.html#wiredInIds"><span class="hs-identifier hs-var">wiredInIds</span></a></span><span>
</span><span id="line-140"></span><span>             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(PrimOp -&gt; Name) -&gt; [PrimOp] -&gt; [Name]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="annot"><span class="annottext">(Id -&gt; Name) -&gt; (PrimOp -&gt; Id) -&gt; PrimOp -&gt; Name
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">PrimOp -&gt; Id
</span><a href="GHC.Builtin.Utils.html#primOpId"><span class="hs-identifier hs-var">primOpId</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[PrimOp]
</span><a href="GHC.Builtin.PrimOps.html#allThePrimOps"><span class="hs-identifier hs-var">allThePrimOps</span></a></span><span>
</span><span id="line-141"></span><span>             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(PrimOp -&gt; Name) -&gt; [PrimOp] -&gt; [Name]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="annot"><span class="annottext">(Id -&gt; Name) -&gt; (PrimOp -&gt; Id) -&gt; PrimOp -&gt; Name
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">PrimOp -&gt; Id
</span><a href="GHC.Builtin.PrimOps.html#primOpWrapperId"><span class="hs-identifier hs-var">primOpWrapperId</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[PrimOp]
</span><a href="GHC.Builtin.PrimOps.html#allThePrimOps"><span class="hs-identifier hs-var">allThePrimOps</span></a></span><span>
</span><span id="line-142"></span><span>             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="GHC.Builtin.Names.html#basicKnownKeyNames"><span class="hs-identifier hs-var">basicKnownKeyNames</span></a></span><span>
</span><span id="line-143"></span><span>             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="GHC.Builtin.Names.TH.html#templateHaskellNames"><span class="hs-identifier hs-var">templateHaskellNames</span></a></span><span>
</span><span id="line-144"></span><span>             </span><span class="hs-special">]</span><span>
</span><span id="line-145"></span><span>    </span><span class="hs-comment">-- All of the names associated with a wired-in TyCon.</span><span>
</span><span id="line-146"></span><span>    </span><span class="hs-comment">-- This includes the TyCon itself, its DataCons and promoted TyCons.</span><span>
</span><span id="line-147"></span><span>    </span><span class="annot"><a href="#local-6989586621680995718"><span class="hs-identifier hs-type">wired_tycon_kk_names</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier hs-type">TyCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-148"></span><span>    </span><span id="local-6989586621680995718"><span class="annot"><span class="annottext">wired_tycon_kk_names :: TyCon -&gt; [Name]
</span><a href="#local-6989586621680995718"><span class="hs-identifier hs-var hs-var">wired_tycon_kk_names</span></a></span></span><span> </span><span id="local-6989586621680995708"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680995708"><span class="hs-identifier hs-var">tc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-149"></span><span>        </span><span class="annot"><span class="annottext">TyCon -&gt; Name
</span><a href="GHC.Core.TyCon.html#tyConName"><span class="hs-identifier hs-var hs-var">tyConName</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680995708"><span class="hs-identifier hs-var">tc</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [Name]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon -&gt; [Name]
</span><a href="#local-6989586621680995706"><span class="hs-identifier hs-var">rep_names</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680995708"><span class="hs-identifier hs-var">tc</span></a></span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; [Name] -&gt; [Name]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680995705"><span class="hs-identifier hs-var">implicits</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-150"></span><span>      </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621680995705"><span class="annot"><span class="annottext">implicits :: [Name]
</span><a href="#local-6989586621680995705"><span class="hs-identifier hs-var hs-var">implicits</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(TyThing -&gt; [Name]) -&gt; [TyThing] -&gt; [Name]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">TyThing -&gt; [Name]
</span><a href="#local-6989586621680995703"><span class="hs-identifier hs-var">thing_kk_names</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon -&gt; [TyThing]
</span><a href="GHC.Driver.Types.html#implicitTyConThings"><span class="hs-identifier hs-var">implicitTyConThings</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680995708"><span class="hs-identifier hs-var">tc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-151"></span><span>
</span><span id="line-152"></span><span>    </span><span class="annot"><a href="#local-6989586621680995701"><span class="hs-identifier hs-type">wired_datacon_kk_names</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-153"></span><span>    </span><span id="local-6989586621680995701"><span class="annot"><span class="annottext">wired_datacon_kk_names :: DataCon -&gt; [Name]
</span><a href="#local-6989586621680995701"><span class="hs-identifier hs-var hs-var">wired_datacon_kk_names</span></a></span></span><span> </span><span id="local-6989586621680995700"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680995700"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-154"></span><span>      </span><span class="annot"><span class="annottext">DataCon -&gt; Name
</span><a href="GHC.Core.DataCon.html#dataConName"><span class="hs-identifier hs-var">dataConName</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680995700"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [Name]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; [Name]
</span><a href="#local-6989586621680995706"><span class="hs-identifier hs-var">rep_names</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#promoteDataCon"><span class="hs-identifier hs-var">promoteDataCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680995700"><span class="hs-identifier hs-var">dc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-155"></span><span>
</span><span id="line-156"></span><span>    </span><span class="annot"><a href="#local-6989586621680995703"><span class="hs-identifier hs-type">thing_kk_names</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyThing"><span class="hs-identifier hs-type">TyThing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-157"></span><span>    </span><span id="local-6989586621680995703"><span class="annot"><span class="annottext">thing_kk_names :: TyThing -&gt; [Name]
</span><a href="#local-6989586621680995703"><span class="hs-identifier hs-var hs-var">thing_kk_names</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ATyCon"><span class="hs-identifier hs-type">ATyCon</span></a></span><span> </span><span id="local-6989586621680995696"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680995696"><span class="hs-identifier hs-var">tc</span></a></span></span><span class="hs-special">)</span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; [Name]
</span><a href="#local-6989586621680995718"><span class="hs-identifier hs-var">wired_tycon_kk_names</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680995696"><span class="hs-identifier hs-var">tc</span></a></span><span>
</span><span id="line-158"></span><span>    </span><span class="annot"><a href="#local-6989586621680995703"><span class="hs-identifier hs-var">thing_kk_names</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#AConLike"><span class="hs-identifier hs-type">AConLike</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.ConLike.html#RealDataCon"><span class="hs-identifier hs-type">RealDataCon</span></a></span><span> </span><span id="local-6989586621680995693"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680995693"><span class="hs-identifier hs-var">dc</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [Name]
</span><a href="#local-6989586621680995701"><span class="hs-identifier hs-var">wired_datacon_kk_names</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680995693"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-159"></span><span>    </span><span class="annot"><a href="#local-6989586621680995703"><span class="hs-identifier hs-var">thing_kk_names</span></a></span><span> </span><span id="local-6989586621680995692"><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621680995692"><span class="hs-identifier hs-var">thing</span></a></span></span><span>                       </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">TyThing -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621680995692"><span class="hs-identifier hs-var">thing</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-160"></span><span>
</span><span id="line-161"></span><span>    </span><span class="hs-comment">-- The TyConRepName for a known-key TyCon has a known key,</span><span>
</span><span id="line-162"></span><span>    </span><span class="hs-comment">-- but isn't itself an implicit thing.  Yurgh.</span><span>
</span><span id="line-163"></span><span>    </span><span class="hs-comment">-- NB: if any of the wired-in TyCons had record fields, the record</span><span>
</span><span id="line-164"></span><span>    </span><span class="hs-comment">--     field names would be in a similar situation.  Ditto class ops.</span><span>
</span><span id="line-165"></span><span>    </span><span class="hs-comment">--     But it happens that there aren't any</span><span>
</span><span id="line-166"></span><span>    </span><span id="local-6989586621680995706"><span class="annot"><span class="annottext">rep_names :: TyCon -&gt; [Name]
</span><a href="#local-6989586621680995706"><span class="hs-identifier hs-var hs-var">rep_names</span></a></span></span><span> </span><span id="local-6989586621680995690"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680995690"><span class="hs-identifier hs-var">tc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Maybe Name
</span><a href="GHC.Core.TyCon.html#tyConRepName_maybe"><span class="hs-identifier hs-var">tyConRepName_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680995690"><span class="hs-identifier hs-var">tc</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-167"></span><span>                        </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680995688"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680995688"><span class="hs-identifier hs-var">n</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680995688"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-168"></span><span>                        </span><span class="annot"><span class="annottext">Maybe Name
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-169"></span><span>
</span><span id="line-170"></span><span class="hs-comment">-- | Check the known-key names list of consistency.</span><span>
</span><span id="line-171"></span><span class="annot"><a href="GHC.Builtin.Utils.html#knownKeyNamesOkay"><span class="hs-identifier hs-type">knownKeyNamesOkay</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-172"></span><span id="knownKeyNamesOkay"><span class="annot"><span class="annottext">knownKeyNamesOkay :: [Name] -&gt; Maybe String
</span><a href="GHC.Builtin.Utils.html#knownKeyNamesOkay"><span class="hs-identifier hs-var hs-var">knownKeyNamesOkay</span></a></span></span><span> </span><span id="local-6989586621680995687"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680995687"><span class="hs-identifier hs-var">all_names</span></a></span></span><span>
</span><span id="line-173"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621680995686"><span class="annot"><span class="annottext">ns :: [Name]
</span><a href="#local-6989586621680995686"><span class="hs-identifier hs-var">ns</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[Name]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Bool) -&gt; [Name] -&gt; [Name]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; (Name -&gt; Bool) -&gt; Name -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Bool
</span><a href="GHC.Types.Unique.html#isValidKnownKeyUnique"><span class="hs-identifier hs-var">isValidKnownKeyUnique</span></a></span><span> </span><span class="annot"><span class="annottext">(Unique -&gt; Bool) -&gt; (Name -&gt; Unique) -&gt; Name -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Unique
forall a. Uniquable a =&gt; a -&gt; Unique
</span><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var">getUnique</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680995687"><span class="hs-identifier hs-var">all_names</span></a></span><span>
</span><span id="line-174"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Maybe String) -&gt; String -&gt; Maybe String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;    Out-of-range known-key uniques: [&quot;</span></span><span>
</span><span id="line-175"></span><span>        </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; String
forall a. [a] -&gt; [[a]] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#intercalate"><span class="hs-identifier hs-var">intercalate</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;, &quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Name -&gt; String) -&gt; [Name] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; String
</span><a href="GHC.Types.Name.Occurrence.html#occNameString"><span class="hs-identifier hs-var">occNameString</span></a></span><span> </span><span class="annot"><span class="annottext">(OccName -&gt; String) -&gt; (Name -&gt; OccName) -&gt; Name -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; OccName
</span><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-var">nameOccName</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680995686"><span class="hs-identifier hs-var">ns</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-176"></span><span>         </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;]&quot;</span></span><span>
</span><span id="line-177"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[(Unique, [Name])] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[(Unique, [Name])]
</span><a href="#local-6989586621680995680"><span class="hs-identifier hs-var">badNamesPairs</span></a></span><span>
</span><span id="line-178"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe String
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-179"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-180"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680995679"><span class="hs-identifier hs-var">badNamesStr</span></a></span><span>
</span><span id="line-181"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-182"></span><span>    </span><span id="local-6989586621680995677"><span class="annot"><span class="annottext">namesEnv :: NameEnv [Name]
</span><a href="#local-6989586621680995677"><span class="hs-identifier hs-var hs-var">namesEnv</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(NameEnv [Name] -&gt; Name -&gt; NameEnv [Name])
-&gt; NameEnv [Name] -&gt; [Name] -&gt; NameEnv [Name]
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680995675"><span class="annot"><span class="annottext">NameEnv [Name]
</span><a href="#local-6989586621680995675"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621680995674"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680995674"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Name -&gt; [Name] -&gt; [Name])
-&gt; (Name -&gt; [Name])
-&gt; NameEnv [Name]
-&gt; Name
-&gt; Name
-&gt; NameEnv [Name]
forall a b.
(a -&gt; b -&gt; b) -&gt; (a -&gt; b) -&gt; NameEnv b -&gt; Name -&gt; a -&gt; NameEnv b
</span><a href="GHC.Types.Name.Env.html#extendNameEnv_Acc"><span class="hs-identifier hs-var">extendNameEnv_Acc</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">:</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Name -&gt; [Name]
forall a. a -&gt; [a]
</span><a href="GHC.Utils.Misc.html#singleton"><span class="hs-identifier hs-var">Utils.singleton</span></a></span><span> </span><span class="annot"><span class="annottext">NameEnv [Name]
</span><a href="#local-6989586621680995675"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680995674"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680995674"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-183"></span><span>                           </span><span class="annot"><span class="annottext">NameEnv [Name]
forall key elt. UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#emptyUFM"><span class="hs-identifier hs-var">emptyUFM</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680995687"><span class="hs-identifier hs-var">all_names</span></a></span><span>
</span><span id="line-184"></span><span>    </span><span id="local-6989586621680995670"><span class="annot"><span class="annottext">badNamesEnv :: NameEnv [Name]
</span><a href="#local-6989586621680995670"><span class="hs-identifier hs-var hs-var">badNamesEnv</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([Name] -&gt; Bool) -&gt; NameEnv [Name] -&gt; NameEnv [Name]
forall elt. (elt -&gt; Bool) -&gt; NameEnv elt -&gt; NameEnv elt
</span><a href="GHC.Types.Name.Env.html#filterNameEnv"><span class="hs-identifier hs-var">filterNameEnv</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680995668"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680995668"><span class="hs-identifier hs-var">ns</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680995668"><span class="hs-identifier hs-var">ns</span></a></span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; Int -&gt; Bool
forall a. [a] -&gt; Int -&gt; Bool
</span><a href="GHC.Utils.Misc.html#lengthExceeds"><span class="hs-operator hs-var">`lengthExceeds`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">NameEnv [Name]
</span><a href="#local-6989586621680995677"><span class="hs-identifier hs-var">namesEnv</span></a></span><span>
</span><span id="line-185"></span><span>    </span><span id="local-6989586621680995680"><span class="annot"><span class="annottext">badNamesPairs :: [(Unique, [Name])]
</span><a href="#local-6989586621680995680"><span class="hs-identifier hs-var hs-var">badNamesPairs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameEnv [Name] -&gt; [(Unique, [Name])]
forall key elt. UniqFM key elt -&gt; [(Unique, elt)]
</span><a href="GHC.Types.Unique.FM.html#nonDetUFMToList"><span class="hs-identifier hs-var">nonDetUFMToList</span></a></span><span> </span><span class="annot"><span class="annottext">NameEnv [Name]
</span><a href="#local-6989586621680995670"><span class="hs-identifier hs-var">badNamesEnv</span></a></span><span>
</span><span id="line-186"></span><span>      </span><span class="hs-comment">-- It's OK to use nonDetUFMToList here because the ordering only affects</span><span>
</span><span id="line-187"></span><span>      </span><span class="hs-comment">-- the message when we get a panic</span><span>
</span><span id="line-188"></span><span>    </span><span id="local-6989586621680995663"><span class="annot"><span class="annottext">badNamesStrs :: [String]
</span><a href="#local-6989586621680995663"><span class="hs-identifier hs-var hs-var">badNamesStrs</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((Unique, [Name]) -&gt; String) -&gt; [(Unique, [Name])] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(Unique, [Name]) -&gt; String
forall {a}. Show a =&gt; (a, [Name]) -&gt; String
</span><a href="#local-6989586621680995662"><span class="hs-identifier hs-var">pairToStr</span></a></span><span> </span><span class="annot"><span class="annottext">[(Unique, [Name])]
</span><a href="#local-6989586621680995680"><span class="hs-identifier hs-var">badNamesPairs</span></a></span><span>
</span><span id="line-189"></span><span>    </span><span id="local-6989586621680995679"><span class="annot"><span class="annottext">badNamesStr :: String
</span><a href="#local-6989586621680995679"><span class="hs-identifier hs-var hs-var">badNamesStr</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; String
</span><a href="../../base/src/Data.OldList.html#unlines"><span class="hs-identifier hs-var">unlines</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621680995663"><span class="hs-identifier hs-var">badNamesStrs</span></a></span><span>
</span><span id="line-190"></span><span>
</span><span id="line-191"></span><span>    </span><span id="local-6989586621680995662"><span class="annot"><span class="annottext">pairToStr :: (a, [Name]) -&gt; String
</span><a href="#local-6989586621680995662"><span class="hs-identifier hs-var hs-var">pairToStr</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680995658"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680995658"><span class="hs-identifier hs-var">uniq</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680995657"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680995657"><span class="hs-identifier hs-var">ns</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;        &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-192"></span><span>                           </span><span class="annot"><span class="annottext">a -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680995658"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-193"></span><span>                           </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;: [&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-194"></span><span>                           </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; String
forall a. [a] -&gt; [[a]] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#intercalate"><span class="hs-identifier hs-var">intercalate</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;, &quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Name -&gt; String) -&gt; [Name] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; String
</span><a href="GHC.Types.Name.Occurrence.html#occNameString"><span class="hs-identifier hs-var">occNameString</span></a></span><span> </span><span class="annot"><span class="annottext">(OccName -&gt; String) -&gt; (Name -&gt; OccName) -&gt; Name -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; OccName
</span><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-var">nameOccName</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680995657"><span class="hs-identifier hs-var">ns</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-195"></span><span>                           </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;]&quot;</span></span><span>
</span><span id="line-196"></span><span>
</span><span id="line-197"></span><span class="hs-comment">-- | Given a 'Unique' lookup its associated 'Name' if it corresponds to a</span><span>
</span><span id="line-198"></span><span class="hs-comment">-- known-key thing.</span><span>
</span><span id="line-199"></span><span class="annot"><a href="GHC.Builtin.Utils.html#lookupKnownKeyName"><span class="hs-identifier hs-type">lookupKnownKeyName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-200"></span><span id="lookupKnownKeyName"><span class="annot"><span class="annottext">lookupKnownKeyName :: Unique -&gt; Maybe Name
</span><a href="GHC.Builtin.Utils.html#lookupKnownKeyName"><span class="hs-identifier hs-var hs-var">lookupKnownKeyName</span></a></span></span><span> </span><span id="local-6989586621680995655"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680995655"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-201"></span><span>    </span><span class="annot"><span class="annottext">Unique -&gt; Maybe Name
</span><a href="GHC.Builtin.Uniques.html#knownUniqueName"><span class="hs-identifier hs-var">knownUniqueName</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680995655"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Name -&gt; Maybe Name -&gt; Maybe Name
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Name Name -&gt; Unique -&gt; Maybe Name
forall key elt. UniqFM key elt -&gt; Unique -&gt; Maybe elt
</span><a href="GHC.Types.Unique.FM.html#lookupUFM_Directly"><span class="hs-identifier hs-var">lookupUFM_Directly</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Name Name
</span><a href="GHC.Builtin.Utils.html#knownKeysMap"><span class="hs-identifier hs-var">knownKeysMap</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680995655"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-202"></span><span>
</span><span id="line-203"></span><span class="hs-comment">-- | Is a 'Name' known-key?</span><span>
</span><span id="line-204"></span><span class="annot"><a href="GHC.Builtin.Utils.html#isKnownKeyName"><span class="hs-identifier hs-type">isKnownKeyName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-205"></span><span id="isKnownKeyName"><span class="annot"><span class="annottext">isKnownKeyName :: Name -&gt; Bool
</span><a href="GHC.Builtin.Utils.html#isKnownKeyName"><span class="hs-identifier hs-var hs-var">isKnownKeyName</span></a></span></span><span> </span><span id="local-6989586621680995651"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680995651"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-206"></span><span>    </span><span class="annot"><span class="annottext">Maybe Name -&gt; Bool
forall a. Maybe a -&gt; Bool
</span><a href="../../base/src/Data.Maybe.html#isJust"><span class="hs-identifier hs-var">isJust</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Unique -&gt; Maybe Name
</span><a href="GHC.Builtin.Uniques.html#knownUniqueName"><span class="hs-identifier hs-var">knownUniqueName</span></a></span><span> </span><span class="annot"><span class="annottext">(Unique -&gt; Maybe Name) -&gt; Unique -&gt; Maybe Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Unique
</span><a href="GHC.Types.Name.html#nameUnique"><span class="hs-identifier hs-var">nameUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680995651"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Name -&gt; UniqFM Name Name -&gt; Bool
forall key elt. Uniquable key =&gt; key -&gt; UniqFM key elt -&gt; Bool
</span><a href="GHC.Types.Unique.FM.html#elemUFM"><span class="hs-identifier hs-var">elemUFM</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680995651"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Name Name
</span><a href="GHC.Builtin.Utils.html#knownKeysMap"><span class="hs-identifier hs-var">knownKeysMap</span></a></span><span>
</span><span id="line-207"></span><span>
</span><span id="line-208"></span><span class="hs-comment">-- | Maps 'Unique's to known-key names.</span><span>
</span><span id="line-209"></span><span class="hs-comment">--</span><span>
</span><span id="line-210"></span><span class="hs-comment">-- The type is @UniqFM Name Name@ to denote that the 'Unique's used</span><span>
</span><span id="line-211"></span><span class="hs-comment">-- in the domain are 'Unique's associated with 'Name's (as opposed</span><span>
</span><span id="line-212"></span><span class="hs-comment">-- to some other namespace of 'Unique's).</span><span>
</span><span id="line-213"></span><span class="annot"><a href="GHC.Builtin.Utils.html#knownKeysMap"><span class="hs-identifier hs-type">knownKeysMap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-214"></span><span id="knownKeysMap"><span class="annot"><span class="annottext">knownKeysMap :: UniqFM Name Name
</span><a href="GHC.Builtin.Utils.html#knownKeysMap"><span class="hs-identifier hs-var hs-var">knownKeysMap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; UniqFM Name Name
forall key. Uniquable key =&gt; [key] -&gt; UniqFM key key
</span><a href="GHC.Types.Unique.FM.html#listToIdentityUFM"><span class="hs-identifier hs-var">listToIdentityUFM</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="GHC.Builtin.Utils.html#knownKeyNames"><span class="hs-identifier hs-var">knownKeyNames</span></a></span><span>
</span><span id="line-215"></span><span>
</span><span id="line-216"></span><span class="hs-comment">-- | Given a 'Unique' lookup any associated arbitrary SDoc's to be displayed by</span><span>
</span><span id="line-217"></span><span class="hs-comment">-- GHCi's ':info' command.</span><span>
</span><span id="line-218"></span><span class="annot"><a href="GHC.Builtin.Utils.html#lookupKnownNameInfo"><span class="hs-identifier hs-type">lookupKnownNameInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-219"></span><span id="lookupKnownNameInfo"><span class="annot"><span class="annottext">lookupKnownNameInfo :: Name -&gt; SDoc
</span><a href="GHC.Builtin.Utils.html#lookupKnownNameInfo"><span class="hs-identifier hs-var hs-var">lookupKnownNameInfo</span></a></span></span><span> </span><span id="local-6989586621680995645"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680995645"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">NameEnv SDoc -&gt; Name -&gt; Maybe SDoc
forall a. NameEnv a -&gt; Name -&gt; Maybe a
</span><a href="GHC.Types.Name.Env.html#lookupNameEnv"><span class="hs-identifier hs-var">lookupNameEnv</span></a></span><span> </span><span class="annot"><span class="annottext">NameEnv SDoc
</span><a href="GHC.Builtin.Utils.html#knownNamesInfo"><span class="hs-identifier hs-var">knownNamesInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680995645"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-220"></span><span>    </span><span class="hs-comment">-- If we do find a doc, we add comment delimiters to make the output</span><span>
</span><span id="line-221"></span><span>    </span><span class="hs-comment">-- of ':info' valid Haskell.</span><span>
</span><span id="line-222"></span><span>    </span><span class="annot"><span class="annottext">Maybe SDoc
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-223"></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680995641"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621680995641"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;{-&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621680995641"><span class="hs-identifier hs-var">doc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-}&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-224"></span><span>
</span><span id="line-225"></span><span class="hs-comment">-- A map from Uniques to SDocs, used in GHCi's ':info' command. (#12390)</span><span>
</span><span id="line-226"></span><span class="annot"><a href="GHC.Builtin.Utils.html#knownNamesInfo"><span class="hs-identifier hs-type">knownNamesInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.Env.html#NameEnv"><span class="hs-identifier hs-type">NameEnv</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-227"></span><span id="knownNamesInfo"><span class="annot"><span class="annottext">knownNamesInfo :: NameEnv SDoc
</span><a href="GHC.Builtin.Utils.html#knownNamesInfo"><span class="hs-identifier hs-var hs-var">knownNamesInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; SDoc -&gt; NameEnv SDoc
forall a. Name -&gt; a -&gt; NameEnv a
</span><a href="GHC.Types.Name.Env.html#unitNameEnv"><span class="hs-identifier hs-var">unitNameEnv</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Builtin.Types.html#coercibleTyConName"><span class="hs-identifier hs-var">coercibleTyConName</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; NameEnv SDoc) -&gt; SDoc -&gt; NameEnv SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-228"></span><span>    </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Coercible is a special constraint with custom solving rules.&quot;</span></span><span>
</span><span id="line-229"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;It is not a class.&quot;</span></span><span>
</span><span id="line-230"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Please see section `The Coercible constraint`&quot;</span></span><span>
</span><span id="line-231"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;of the user's guide for details.&quot;</span></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-232"></span><span>
</span><span id="line-233"></span><span class="hs-comment">{-
We let a lot of &quot;non-standard&quot; values be visible, so that we can make
sense of them in interface pragmas. It's cool, though they all have
&quot;non-standard&quot; names, so they won't get past the parser in user code.

************************************************************************
*                                                                      *
                PrimOpIds
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-244"></span><span>
</span><span id="line-245"></span><span class="annot"><a href="GHC.Builtin.Utils.html#primOpIds"><span class="hs-identifier hs-type">primOpIds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Arr.html#Array"><span class="hs-identifier hs-type">Array</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-246"></span><span class="hs-comment">-- A cache of the PrimOp Ids, indexed by PrimOp tag</span><span>
</span><span id="line-247"></span><span id="primOpIds"><span class="annot"><span class="annottext">primOpIds :: Array Int Id
</span><a href="GHC.Builtin.Utils.html#primOpIds"><span class="hs-identifier hs-var hs-var">primOpIds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int, Int) -&gt; [(Int, Id)] -&gt; Array Int Id
forall i e. Ix i =&gt; (i, i) -&gt; [(i, e)] -&gt; Array i e
</span><a href="../../base/src/GHC.Arr.html#array"><span class="hs-identifier hs-var">array</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><a href="GHC.Builtin.PrimOps.html#maxPrimOpTag"><span class="hs-identifier hs-var">maxPrimOpTag</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PrimOp -&gt; Int
</span><a href="GHC.Builtin.PrimOps.html#primOpTag"><span class="hs-identifier hs-var">primOpTag</span></a></span><span> </span><span class="annot"><span class="annottext">PrimOp
</span><a href="#local-6989586621680995632"><span class="hs-identifier hs-var">op</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">PrimOp -&gt; Id
</span><a href="GHC.Types.Id.Make.html#mkPrimOpId"><span class="hs-identifier hs-var">mkPrimOpId</span></a></span><span> </span><span class="annot"><span class="annottext">PrimOp
</span><a href="#local-6989586621680995632"><span class="hs-identifier hs-var">op</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-248"></span><span>                                   </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621680995632"><span class="annot"><span class="annottext">PrimOp
</span><a href="#local-6989586621680995632"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[PrimOp]
</span><a href="GHC.Builtin.PrimOps.html#allThePrimOps"><span class="hs-identifier hs-var">allThePrimOps</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-249"></span><span>
</span><span id="line-250"></span><span class="annot"><a href="GHC.Builtin.Utils.html#primOpId"><span class="hs-identifier hs-type">primOpId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Builtin.PrimOps.html#PrimOp"><span class="hs-identifier hs-type">PrimOp</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-251"></span><span id="primOpId"><span class="annot"><span class="annottext">primOpId :: PrimOp -&gt; Id
</span><a href="GHC.Builtin.Utils.html#primOpId"><span class="hs-identifier hs-var hs-var">primOpId</span></a></span></span><span> </span><span id="local-6989586621680995630"><span class="annot"><span class="annottext">PrimOp
</span><a href="#local-6989586621680995630"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Array Int Id
</span><a href="GHC.Builtin.Utils.html#primOpIds"><span class="hs-identifier hs-var">primOpIds</span></a></span><span> </span><span class="annot"><span class="annottext">Array Int Id -&gt; Int -&gt; Id
forall i e. Ix i =&gt; Array i e -&gt; i -&gt; e
</span><a href="../../base/src/GHC.Arr.html#%21"><span class="hs-operator hs-var">!</span></a></span><span> </span><span class="annot"><span class="annottext">PrimOp -&gt; Int
</span><a href="GHC.Builtin.PrimOps.html#primOpTag"><span class="hs-identifier hs-var">primOpTag</span></a></span><span> </span><span class="annot"><span class="annottext">PrimOp
</span><a href="#local-6989586621680995630"><span class="hs-identifier hs-var">op</span></a></span><span>
</span><span id="line-252"></span><span>
</span><span id="line-253"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
            Export lists for pseudo-modules (GHC.Prim)
*                                                                      *
************************************************************************

GHC.Prim &quot;exports&quot; all the primops and primitive types, some
wired-in Ids.
-}</span><span>
</span><span id="line-263"></span><span>
</span><span id="line-264"></span><span class="annot"><a href="GHC.Builtin.Utils.html#ghcPrimExports"><span class="hs-identifier hs-type">ghcPrimExports</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.Types.html#IfaceExport"><span class="hs-identifier hs-type">IfaceExport</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-265"></span><span id="ghcPrimExports"><span class="annot"><span class="annottext">ghcPrimExports :: [IfaceExport]
</span><a href="GHC.Builtin.Utils.html#ghcPrimExports"><span class="hs-identifier hs-var hs-var">ghcPrimExports</span></a></span></span><span>
</span><span id="line-266"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Id -&gt; IfaceExport) -&gt; [Id] -&gt; [IfaceExport]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; IfaceExport
</span><a href="GHC.Types.Avail.html#avail"><span class="hs-identifier hs-var">avail</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; IfaceExport) -&gt; (Id -&gt; Name) -&gt; Id -&gt; IfaceExport
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="GHC.Types.Id.Make.html#ghcPrimIds"><span class="hs-identifier hs-var">ghcPrimIds</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceExport] -&gt; [IfaceExport] -&gt; [IfaceExport]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-267"></span><span>   </span><span class="annot"><span class="annottext">(PrimOp -&gt; IfaceExport) -&gt; [PrimOp] -&gt; [IfaceExport]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; IfaceExport
</span><a href="GHC.Types.Avail.html#avail"><span class="hs-identifier hs-var">avail</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; IfaceExport) -&gt; (PrimOp -&gt; Name) -&gt; PrimOp -&gt; IfaceExport
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="annot"><span class="annottext">(Id -&gt; Name) -&gt; (PrimOp -&gt; Id) -&gt; PrimOp -&gt; Name
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">PrimOp -&gt; Id
</span><a href="GHC.Builtin.Utils.html#primOpId"><span class="hs-identifier hs-var">primOpId</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[PrimOp]
</span><a href="GHC.Builtin.PrimOps.html#allThePrimOps"><span class="hs-identifier hs-var">allThePrimOps</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceExport] -&gt; [IfaceExport] -&gt; [IfaceExport]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-268"></span><span>   </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [FieldLabel] -&gt; IfaceExport
</span><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-var">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680995626"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680995626"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-269"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621680995625"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680995625"><span class="hs-identifier hs-var">tc</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="GHC.Builtin.Types.Prim.html#funTyCon"><span class="hs-identifier hs-var">funTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; [TyCon] -&gt; [TyCon]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[TyCon]
</span><a href="GHC.Builtin.Types.Prim.html#exposedPrimTyCons"><span class="hs-identifier hs-var">exposedPrimTyCons</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680995626"><span class="annot"><span class="annottext">n :: Name
</span><a href="#local-6989586621680995626"><span class="hs-identifier hs-var hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Name
</span><a href="GHC.Core.TyCon.html#tyConName"><span class="hs-identifier hs-var hs-var">tyConName</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680995625"><span class="hs-identifier hs-var">tc</span></a></span><span>  </span><span class="hs-special">]</span><span>
</span><span id="line-270"></span><span>
</span><span id="line-271"></span><span class="annot"><a href="GHC.Builtin.Utils.html#ghcPrimDeclDocs"><span class="hs-identifier hs-type">ghcPrimDeclDocs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#DeclDocMap"><span class="hs-identifier hs-type">DeclDocMap</span></a></span><span>
</span><span id="line-272"></span><span id="ghcPrimDeclDocs"><span class="annot"><span class="annottext">ghcPrimDeclDocs :: DeclDocMap
</span><a href="GHC.Builtin.Utils.html#ghcPrimDeclDocs"><span class="hs-identifier hs-var hs-var">ghcPrimDeclDocs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Map Name HsDocString -&gt; DeclDocMap
</span><a href="GHC.Hs.Doc.html#DeclDocMap"><span class="hs-identifier hs-var">DeclDocMap</span></a></span><span> </span><span class="annot"><span class="annottext">(Map Name HsDocString -&gt; DeclDocMap)
-&gt; Map Name HsDocString -&gt; DeclDocMap
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[(Name, HsDocString)] -&gt; Map Name HsDocString
forall k a. Ord k =&gt; [(k, a)] -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#fromList"><span class="hs-identifier hs-var">Map.fromList</span></a></span><span> </span><span class="annot"><span class="annottext">([(Name, HsDocString)] -&gt; Map Name HsDocString)
-&gt; [(Name, HsDocString)] -&gt; Map Name HsDocString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">((String, String) -&gt; Maybe (Name, HsDocString))
-&gt; [(String, String)] -&gt; [(Name, HsDocString)]
forall a b. (a -&gt; Maybe b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/Data.Maybe.html#mapMaybe"><span class="hs-identifier hs-var">mapMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">(String, String) -&gt; Maybe (Name, HsDocString)
</span><a href="#local-6989586621680995620"><span class="hs-identifier hs-var">findName</span></a></span><span> </span><span class="annot"><span class="annottext">[(String, String)]
</span><a href="GHC.Builtin.PrimOps.html#primOpDocs"><span class="hs-identifier hs-var">primOpDocs</span></a></span><span>
</span><span id="line-273"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-274"></span><span>    </span><span id="local-6989586621680995618"><span class="annot"><span class="annottext">names :: [Name]
</span><a href="#local-6989586621680995618"><span class="hs-identifier hs-var hs-var">names</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Id -&gt; Name) -&gt; [Id] -&gt; [Name]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="GHC.Types.Id.Make.html#ghcPrimIds"><span class="hs-identifier hs-var">ghcPrimIds</span></a></span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; [Name] -&gt; [Name]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-275"></span><span>            </span><span class="annot"><span class="annottext">(PrimOp -&gt; Name) -&gt; [PrimOp] -&gt; [Name]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="annot"><span class="annottext">(Id -&gt; Name) -&gt; (PrimOp -&gt; Id) -&gt; PrimOp -&gt; Name
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">PrimOp -&gt; Id
</span><a href="GHC.Builtin.Utils.html#primOpId"><span class="hs-identifier hs-var">primOpId</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[PrimOp]
</span><a href="GHC.Builtin.PrimOps.html#allThePrimOps"><span class="hs-identifier hs-var">allThePrimOps</span></a></span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; [Name] -&gt; [Name]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-276"></span><span>            </span><span class="annot"><span class="annottext">(TyCon -&gt; Name) -&gt; [TyCon] -&gt; [Name]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Name
</span><a href="GHC.Core.TyCon.html#tyConName"><span class="hs-identifier hs-var hs-var">tyConName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon
</span><a href="GHC.Builtin.Types.Prim.html#funTyCon"><span class="hs-identifier hs-var">funTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; [TyCon] -&gt; [TyCon]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[TyCon]
</span><a href="GHC.Builtin.Types.Prim.html#exposedPrimTyCons"><span class="hs-identifier hs-var">exposedPrimTyCons</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-277"></span><span>    </span><span id="local-6989586621680995620"><span class="annot"><span class="annottext">findName :: (String, String) -&gt; Maybe (Name, HsDocString)
</span><a href="#local-6989586621680995620"><span class="hs-identifier hs-var hs-var">findName</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680995610"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680995610"><span class="hs-identifier hs-var">nameStr</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680995609"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680995609"><span class="hs-identifier hs-var">doc</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-278"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680995608"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680995608"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Bool) -&gt; [Name] -&gt; Maybe Name
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Maybe a
</span><a href="../../base/src/Data.Foldable.html#find"><span class="hs-identifier hs-var">find</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680995610"><span class="hs-identifier hs-var">nameStr</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(String -&gt; Bool) -&gt; (Name -&gt; String) -&gt; Name -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; String
forall a. NamedThing a =&gt; a -&gt; String
</span><a href="GHC.Types.Name.html#getOccString"><span class="hs-identifier hs-var">getOccString</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680995618"><span class="hs-identifier hs-var">names</span></a></span><span>
</span><span id="line-279"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Name, HsDocString) -&gt; Maybe (Name, HsDocString)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680995608"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; HsDocString
</span><a href="GHC.Hs.Doc.html#mkHsDocString"><span class="hs-identifier hs-var">mkHsDocString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680995609"><span class="hs-identifier hs-var">doc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-280"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (Name, HsDocString)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-281"></span><span>
</span><span id="line-282"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
            Built-in keys
*                                                                      *
************************************************************************

ToDo: make it do the ``like'' part properly (as in 0.26 and before).
-}</span><span>
</span><span id="line-291"></span><span>
</span><span id="line-292"></span><span class="annot"><a href="GHC.Builtin.Utils.html#maybeCharLikeCon"><span class="hs-identifier hs-type">maybeCharLikeCon</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Builtin.Utils.html#maybeIntLikeCon"><span class="hs-identifier hs-type">maybeIntLikeCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-293"></span><span id="maybeCharLikeCon"><span class="annot"><span class="annottext">maybeCharLikeCon :: DataCon -&gt; Bool
</span><a href="GHC.Builtin.Utils.html#maybeCharLikeCon"><span class="hs-identifier hs-var hs-var">maybeCharLikeCon</span></a></span></span><span> </span><span id="local-6989586621680995605"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680995605"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680995605"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Unique -&gt; Bool
forall a. Uniquable a =&gt; a -&gt; Unique -&gt; Bool
</span><a href="GHC.Types.Unique.html#hasKey"><span class="hs-operator hs-var">`hasKey`</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#charDataConKey"><span class="hs-identifier hs-var">charDataConKey</span></a></span><span>
</span><span id="line-294"></span><span id="maybeIntLikeCon"><span class="annot"><span class="annottext">maybeIntLikeCon :: DataCon -&gt; Bool
</span><a href="GHC.Builtin.Utils.html#maybeIntLikeCon"><span class="hs-identifier hs-var hs-var">maybeIntLikeCon</span></a></span></span><span>  </span><span id="local-6989586621680995602"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680995602"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680995602"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Unique -&gt; Bool
forall a. Uniquable a =&gt; a -&gt; Unique -&gt; Bool
</span><a href="GHC.Types.Unique.html#hasKey"><span class="hs-operator hs-var">`hasKey`</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#intDataConKey"><span class="hs-identifier hs-var">intDataConKey</span></a></span><span>
</span><span id="line-295"></span><span>
</span><span id="line-296"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
            Class predicates
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-303"></span><span>
</span><span id="line-304"></span><span class="annot"><a href="GHC.Builtin.Utils.html#isNumericClass"><span class="hs-identifier hs-type">isNumericClass</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Builtin.Utils.html#isStandardClass"><span class="hs-identifier hs-type">isStandardClass</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-305"></span><span>
</span><span id="line-306"></span><span id="isNumericClass"><span class="annot"><span class="annottext">isNumericClass :: Class -&gt; Bool
</span><a href="GHC.Builtin.Utils.html#isNumericClass"><span class="hs-identifier hs-var hs-var">isNumericClass</span></a></span></span><span>     </span><span id="local-6989586621680995600"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680995600"><span class="hs-identifier hs-var">clas</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Class -&gt; Unique
</span><a href="GHC.Core.Class.html#classKey"><span class="hs-identifier hs-var hs-var">classKey</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680995600"><span class="hs-identifier hs-var">clas</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; [Unique] -&gt; Bool
forall a. Eq a =&gt; a -&gt; [a] -&gt; Bool
</span><a href="GHC.Builtin.Utils.html#is_elem"><span class="hs-operator hs-var">`is_elem`</span></a></span><span> </span><span class="annot"><span class="annottext">[Unique]
</span><a href="GHC.Builtin.Names.html#numericClassKeys"><span class="hs-identifier hs-var">numericClassKeys</span></a></span><span>
</span><span id="line-307"></span><span id="isStandardClass"><span class="annot"><span class="annottext">isStandardClass :: Class -&gt; Bool
</span><a href="GHC.Builtin.Utils.html#isStandardClass"><span class="hs-identifier hs-var hs-var">isStandardClass</span></a></span></span><span>    </span><span id="local-6989586621680995596"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680995596"><span class="hs-identifier hs-var">clas</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Class -&gt; Unique
</span><a href="GHC.Core.Class.html#classKey"><span class="hs-identifier hs-var hs-var">classKey</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680995596"><span class="hs-identifier hs-var">clas</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; [Unique] -&gt; Bool
forall a. Eq a =&gt; a -&gt; [a] -&gt; Bool
</span><a href="GHC.Builtin.Utils.html#is_elem"><span class="hs-operator hs-var">`is_elem`</span></a></span><span> </span><span class="annot"><span class="annottext">[Unique]
</span><a href="GHC.Builtin.Names.html#standardClassKeys"><span class="hs-identifier hs-var">standardClassKeys</span></a></span><span>
</span><span id="line-308"></span><span>
</span><span id="line-309"></span><span id="local-6989586621680995779"><span class="annot"><a href="GHC.Builtin.Utils.html#is_elem"><span class="hs-identifier hs-type">is_elem</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="#local-6989586621680995779"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680995779"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680995779"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-310"></span><span id="is_elem"><span class="annot"><span class="annottext">is_elem :: forall a. Eq a =&gt; a -&gt; [a] -&gt; Bool
</span><a href="GHC.Builtin.Utils.html#is_elem"><span class="hs-identifier hs-var hs-var">is_elem</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a -&gt; [a] -&gt; Bool
forall a. Eq a =&gt; String -&gt; a -&gt; [a] -&gt; Bool
</span><a href="GHC.Utils.Misc.html#isIn"><span class="hs-identifier hs-var">isIn</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;is_X_Class&quot;</span></span><span>
</span><span id="line-311"></span></pre></body></html>